package cn.lanqiao.springboot.mapper;

import cn.lanqiao.springboot.vo.UserVO;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Update;
import org.springframework.stereotype.Repository;

@Repository
public interface UserRoleMapper {

    @Insert("insert into system_user_role (user_id, role_id) values (#{userId},#{roleId})")
    void insert(UserVO userVO);

    @Update("update system_user_role set role_id = #{roleId} where user_id = #{userId}")
    void update(UserVO userVO);

    @Delete("delete from system_user_role where user_id = #{userId}")
    void delete(int userId);
}
